package com.jzg.jcptadmin.adpter;/**
 * author: gcc
 * date: 2016/5/26 14:27
 * email:
 */

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.jzg.jcptadmin.R;
import com.zhy.view.flowlayout.FlowLayout;
import com.zhy.view.flowlayout.TagAdapter;
import com.zhy.view.flowlayout.TagFlowLayout;

import java.util.List;

/**
 * author: guochen
 * date: 2016/5/26 14:27
 * email: 
 */
public class RejectAdapter extends TagAdapter<String> {
    private TagFlowLayout layout;
    private Context context;
    public RejectAdapter(String[] datas) {
        super(datas);
    }

    public RejectAdapter(List<String> datas,TagFlowLayout layout,Context context) {
        super(datas);
        this.layout = layout;
        this.context = context;
    }
    @Override
    public View getView(FlowLayout parent, int position, String s) {
        TextView tv = (TextView) LayoutInflater.from(context).inflate(R.layout.reason_tag,layout, false);
        tv.setText(s);
        return tv;
    }
}
